<extend name="Public/publicHTML" />
<block name="nav"></block>


<block name="content">

<link href="__COMMON__/daterangepicker/daterangepicker-bs3.css"
	rel="stylesheet" type="text/css" />
<script src="__COMMON__/daterangepicker/moment.min.js"
	type="text/javascript"></script> <script
	src="__COMMON__/daterangepicker/daterangepicker.js"
	type="text/javascript"></script>

<link rel="stylesheet" href="__COMMON__/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="__COMMON__/bootstrap/css/font-awesome.min.css" />

<div class="wrapper">
	<include file="Public/breadcrumb" />
	<section class="content ">
		<!-- Main content -->
		<div class="container-fluid">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						<i class="fa fa-list"></i> 添加团购活动
					</h3>
				</div>
				<div class="panel-body ">
					<!--表单数据-->
					<form method="post" id="group">
						<!--通用信息-->
						<div class="tab-content col-md-10">
							<div class="tab-pane active" id="tab_tongyong">
								<table class="table table-bordered">
									<tbody>
										<tr>
											<td class="col-sm-2">团购标题：</td>
											<td class="col-sm-6"><input type="text"
												class="form-control" name="{$groupModel::$title_d}" id="title" value="{$data[$groupModel::$title_d]}"/> 
												<span id="err_attr_name"
												style="color: #F00; display: none;"></span></td>
											<td class="col-sm-4">请填写团购标题</td>
										</tr>
										<tr>
											<td>开始时间：</td>
											<td><input type="text" class="form-control"
												id="start_time" name="{$groupModel::$startTime_d}" value="{$data[$groupModel::$startTime_d]|date='Y-m-d H:i:s',###}">
											</td>
											<td class="col-sm-4">团购开始时间</td>
										</tr>
										<tr>
											<td>结束时间：</td>
											<td><input type="text" class="form-control"
												id="end_time" name="{$groupModel::$endTime_d}" value="{$data[$groupModel::$endTime_d]|date='Y-m-d H:i:s',###}">
											</td>
											<td class="col-sm-4">团购结束时间</td>
										</tr>

										<tr>
											<td>设置团购商品：</td>
											<td>
												<div class="col-xs-9">
													<input type="text" disabled="disabled" value="{$data[$goodsModel::$title_d]}" id="goods_name" class="form-control" />
												</div>
												<div class="col-xs-3">
													<input type="hidden" id="goods_id" value="{$data[$groupModel::$goodsId_d]}" name="{$groupModel::$goodsId_d}"/> 
													<input class="btn btn-primary" type="button"
														onclick="GroupObj.selectGoods('{:U('searchGoods')}')" value="选择商品">
												</div>
											</td>
											<td class="col-sm-4">请选择加入团购的商品</td>
										</tr>
										<tr>
											<td>团购价格：</td>
											<td>
												<div class="col-xs-4">
													<input type="text" class="form-control" id="price"
														name="{$groupModel::$price_d}" 
														value="{$data[$groupModel::$price_d]}"
														onpaste="this.value=this.value.replace(/[^\d.]/g,'')"
														onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" />
												</div> <span id="price_html"></span>
											</td>
											<td class="col-sm-4">商品团购价格</td>
										</tr>
										<tr>
											<td>参团数量：</td>
											<td><input type="text" class="form-control"
												id="goods_num" name="{$groupModel::$goodsNum_d}" value="{$data[$groupModel::$goodsNum_d]}"
												onpaste="this.value=this.value.replace(/[^\d]/g,'')"
												onkeyup="this.value=this.value.replace(/[^\d]/g,'')" /></td>
											<td class="col-sm-4">请填写自然数，参与团购的商品数量</td>
										</tr>
										<tr>
											<td>虚拟购买数：</td>
											<td><input type="text" class="form-control"
												name="{$groupModel::$virtualNum_d}"
												value="{$data[$groupModel::$virtualNum_d]}"
												onpaste="this.value=this.value.replace(/[^\d]/g,'')"
												onkeyup="this.value=this.value.replace(/[^\d]/g,'')" /></td>
											<td class="col-sm-4">虚拟已购买参团人数</td>
										</tr>
										<tr>
											<td>团购介绍：</td>
											<td><textarea class="form-control" rows="4"
													placeholder="请输入团购介绍" name="{$groupModel::$description_d}">{$data[$groupModel::$description_d]}</textarea>
											</td>
											<td class="col-sm-4">团购描述介绍</td>
										</tr>
									</tbody>
									<tfoot>
										<tr>
											<td><input class="btn btn-default" type="reset"
												value="重置"></td>
											<td class="col-sm-4">
												<input type="hidden" name="{$groupModel::$id_d}" value="{$data[$groupModel::$id_d]}"/>
											</td>
											<td class="text-right"><input class="btn btn-primary"
												type="button" onclick="GroupObj.addPromation('group','{:U('saveGroup')}')" value="保存"></td>
										</tr>
									</tfoot>
								</table>
							</div>
						</div>
					</form>
					<!--表单数据-->
				</div>
			</div>
		</div>
	</section>
</div>
<script type="text/javascript" src="__COMMON__/js/jquery-form.js"></script> 
<script type="text/javascript" src="__COMMON__/js/alert.js?a={:time()}"></script> 
<script type="text/javascript" src="__JS__/group/group.js?a={:time()}"></script>
<script type="text/javascript" src="__JS__/group/callBack.js?a={:time()}"></script> 
</block>